package com.ctsi.ssdc.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.ctsi.ssdc.annotation.AutoId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.time.ZonedDateTime;

/**
 * @author ctsi-biyi-generator
*/
@ApiModel(description = "LitemallAdmin")
@TableName("litemall_admin")
public class LitemallAdmin extends Model<LitemallAdmin> implements Serializable {
    /**
     * @Fields id 
     */
    @ApiModelProperty("")
    @AutoId(primaryKey = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value="id")
    @TableField(value="id")
    private Integer id;

    /**
     * @Fields username 管理员名称
     */
    @ApiModelProperty("username")
    @TableField(value="username")
    private String username;

    /**
     * @Fields password 管理员密码
     */
    @ApiModelProperty("password")
    @TableField(value="password")
    private String password;

    /**
     * @Fields lastLoginIp 最近一次登录IP地址
     */
    @ApiModelProperty("lastLoginIp")
    @TableField(value="last_login_ip")
    private String lastLoginIp;

    /**
     * @Fields lastLoginTime 最近一次登录时间
     */
    @ApiModelProperty("lastLoginTime")
    @TableField(value="last_login_time")
    private ZonedDateTime lastLoginTime;

    /**
     * @Fields avatar 头像图片
     */
    @ApiModelProperty("avatar")
    @TableField(value="avatar")
    private String avatar;

    /**
     * @Fields addTime 创建时间
     */
    @ApiModelProperty("addTime")
    @TableField(value="add_time")
    private ZonedDateTime addTime;

    /**
     * @Fields updateTime 更新时间
     */
    @ApiModelProperty("updateTime")
    @TableField(value="update_time")
    private ZonedDateTime updateTime;

    /**
     * @Fields deleted 逻辑删除
     */
    @ApiModelProperty("deleted")
    @TableField(value="deleted")
    private Boolean deleted;

    /**
     * @Fields roleIds 角色列表
     */
    @ApiModelProperty("roleIds")
    @TableField(value="role_ids")
    private String roleIds;

    private static final long serialVersionUID = 1L;

    /** 
     * @return id 
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /** 
     * @return username 管理员名称
     */
    public String getUsername() {
        return username;
    }

    /**
     * @param username 管理员名称
     */
    public void setUsername(String username) {
        this.username = username == null ? null : username.trim();
    }

    /** 
     * @return password 管理员密码
     */
    public String getPassword() {
        return password;
    }

    /**
     * @param password 管理员密码
     */
    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    /** 
     * @return last_login_ip 最近一次登录IP地址
     */
    public String getLastLoginIp() {
        return lastLoginIp;
    }

    /**
     * @param lastLoginIp 最近一次登录IP地址
     */
    public void setLastLoginIp(String lastLoginIp) {
        this.lastLoginIp = lastLoginIp == null ? null : lastLoginIp.trim();
    }

    /** 
     * @return last_login_time 最近一次登录时间
     */
    public ZonedDateTime getLastLoginTime() {
        return lastLoginTime;
    }

    /**
     * @param lastLoginTime 最近一次登录时间
     */
    public void setLastLoginTime(ZonedDateTime lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    /** 
     * @return avatar 头像图片
     */
    public String getAvatar() {
        return avatar;
    }

    /**
     * @param avatar 头像图片
     */
    public void setAvatar(String avatar) {
        this.avatar = avatar == null ? null : avatar.trim();
    }

    /** 
     * @return add_time 创建时间
     */
    public ZonedDateTime getAddTime() {
        return addTime;
    }

    /**
     * @param addTime 创建时间
     */
    public void setAddTime(ZonedDateTime addTime) {
        this.addTime = addTime;
    }

    /** 
     * @return update_time 更新时间
     */
    public ZonedDateTime getUpdateTime() {
        return updateTime;
    }

    /**
     * @param updateTime 更新时间
     */
    public void setUpdateTime(ZonedDateTime updateTime) {
        this.updateTime = updateTime;
    }

    /** 
     * @return deleted 逻辑删除
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * @param deleted 逻辑删除
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    /** 
     * @return role_ids 角色列表
     */
    public String getRoleIds() {
        return roleIds;
    }

    /**
     * @param roleIds 角色列表
     */
    public void setRoleIds(String roleIds) {
        this.roleIds = roleIds == null ? null : roleIds.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        LitemallAdmin other = (LitemallAdmin) that;
        return (this.getId() == null ? other.getId() == null :
				 this.getId().equals(other.getId()))
            && (this.getUsername() == null ? other.getUsername() == null :
				 this.getUsername().equals(other.getUsername()))
            && (this.getPassword() == null ? other.getPassword() == null :
				 this.getPassword().equals(other.getPassword()))
            && (this.getLastLoginIp() == null ? other.getLastLoginIp() == null :
				 this.getLastLoginIp().equals(other.getLastLoginIp()))
            && (this.getLastLoginTime() == null ? other.getLastLoginTime() == null :
				 this.getLastLoginTime().equals(other.getLastLoginTime()))
            && (this.getAvatar() == null ? other.getAvatar() == null :
				 this.getAvatar().equals(other.getAvatar()))
            && (this.getAddTime() == null ? other.getAddTime() == null :
				 this.getAddTime().equals(other.getAddTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null :
				 this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getDeleted() == null ? other.getDeleted() == null :
				 this.getDeleted().equals(other.getDeleted()))
            && (this.getRoleIds() == null ? other.getRoleIds() == null :
				 this.getRoleIds().equals(other.getRoleIds()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
        result = prime * result + ((getLastLoginIp() == null) ? 0 : getLastLoginIp().hashCode());
        result = prime * result + ((getLastLoginTime() == null) ? 0 : getLastLoginTime().hashCode());
        result = prime * result + ((getAvatar() == null) ? 0 : getAvatar().hashCode());
        result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        result = prime * result + ((getRoleIds() == null) ? 0 : getRoleIds().hashCode());
        return result;
    }
}